package com.entrogy.dao;

import com.entrogy.bean.RegistorEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RegistorMapper {

    @Insert("insert into registor_information(parent_visitor_id,parent_visitor_name,parent_visitor_phone,parent_visitor_base64,student_name) values " +
            "(#{parent_visitor_id},#{parent_visitor_name},#{parent_visitor_phone},#{parent_visitor_base64},#{student_name})")
    int insertRegistor(String parent_visitor_id, String parent_visitor_name, String parent_visitor_phone, String parent_visitor_base64, String student_name);

    @Select("select * FROM registor_information where parent_visitor_name=#{parent_visitor_name}")
    List<RegistorEntity> selectRegistorByName(String parent_visitor_name);
}
